<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath(); 
    response.setHeader("Cache-Control","no-store");  
    response.setDateHeader("Expires", 0);  
    response.setHeader("Pragma","no-cache");   
%>
<!doctype html>
<html>
	<head>
	    <meta charset="UTF-8">
	    <meta name="copyright" content="Tencent"/>
	    <meta name="keywords" content=""/>
	    <meta name="description" content=""/>
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta name="format-detection" content="telephone=no">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
	    <meta name="apple-mobile-web-app-capable" content="yes">
	    <meta name="apple-mobile-web-app-status-bar-style" content="black">
	    <title>个人</title>
	    <link rel="stylesheet" type="text/css" href="<%=path%>/css/companycard/public.css" />
	    <link rel="stylesheet" type="text/css" href="<%=path%>/css/companycard/s04.css" />
	    
	    
	    <!-- 主页面处理入口 - Msh -->
		<script type="text/javascript" src="<%=path%>/js/mobile/main-page.js"></script>
	    
	</head>
	<body>
	    <div class="titles" onclick="toShowcardInfo()">
	        <i>我的酷名片</i>
	        <dl class="fix">
	            <dt>
	            	<c:choose>
	            		<c:when test="${card.businessCardInfo.headPicture != null && car.businessCardInfo.headPicture != ''}">
	            			<img style="width:94px;height: 94px;" src="${card.businessCardInfo.headPicture }" />
	            		</c:when>
	            		<c:otherwise>
	            			<img src="<%=path%>/images/companycard/people.png" />
	            		</c:otherwise>
	            	</c:choose>
	            </dt>
	            <dd>
	                <h5 id='name'>${card.businessCardInfo.name}</h5>
	                <p id='company'>${card.businessCardInfo.companyName}</p>
	                <p id='job'>${card.businessCardInfo.job}</p>
	            </dd>
	        </dl>
	        <a href="javascript:;" class="into" style="top: 50%!important"></a>
	    </div>
	    <ul class="list">

	        <li>
	            <a href="<%=path%>/view/mobile/pageCardStatistics?point=1">
	                <img src="<%=path%>/images/companycard/pic1.png" />当日统计
	                <i>打开量:${card.dateDisBrowseNum}<a class="into"></a></i>
	            </a>
	        </li>
	        <li>
	            <a href="<%=path%>/view/mobile/pageCardStatistics?point=2">
	                <img src="<%=path%>/images/companycard/pic2.png" />当月统计
	                <i>打开量:${card.monthDisBrowseNum}<a class="into"></a></i>
	            </a>
	        </li>
	        <li>
	            <a href="<%=path%>/view/mobile/pageCardStatistics?point=3">
	                <img src="<%=path%>/images/companycard/pic3.png" />当年统计
	                <i>打开量:${card.yearDisBrowseNum}<a class="into"></a></i>
	            </a>
	        </li>
	        
	        <li>
	            <a href="<%=path%>/mobile/pageCardTopTen?point=1">
	                <img src="<%=path%>/images/companycard/pic4.png" />打开排行
	                <i>
		                <c:if test="${car != null}">
		                	我的排名:${car.openOfmineRowNum}
		                </c:if>
		                <a class="into"></a>
	                </i>
	            </a>
	        </li>
	        <li>
	            <a href="<%=path%>/mobile/pageCardTopTen?point=2">
	                <img src="<%=path%>/images/companycard/pic5.png" />转化排行
	                <i>
		                <c:if test="${car != null }">
		                	我的排名:${car.convertOfmineRowNum}
		                </c:if>
		                <a class="into"></a>
	                </i>
	            </a>
	        </li>        
	    </ul>
	
	    <ul class="list">
	        <li>
	            <a href="<%=path%>/mobile/pageUserInfoSetting">
	                <img src="<%=path%>/images/companycard/pic6.png" />设置名片
	                <i><a class="into"></a></i>
	            </a>
	        </li>
	    </ul>    
	</body>
</html>


    <script type="text/javascript" src="<%=path%>/js/companycard/jquery-1.8.1.min.js"></script>
	<script type="text/javascript">


	window.onpageshow = function(event) {
		if (event.persisted) {
			window.location.reload();
		}
	};
	
	function parseUrl(url) {
	    var a =  document.createElement('a');
	    a.href = url;
	    return {
	        source: url,
	        protocol: a.protocol.replace(':',''),
	        host: a.hostname,
	        port: a.port,
	        query: a.search,
	        params: (function(){
	            var ret = {},
	                seg = a.search.replace(/^\?/,'').split('&'),
	                len = seg.length, i = 0, s;
	            for (;i<len;i++) {
	                if (!seg[i]) { continue; }
	                s = seg[i].split('=');
	                ret[s[0]] = s[1];
	            }
	            return ret;
	        })(),
	        file: (a.pathname.match(/\/([^\/?#]+)$/i) || [,''])[1],
	        hash: a.hash.replace('#',''),
	        path: a.pathname.replace(/^([^\/])/,'/$1'),
	        relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [,''])[1],
	        segments: a.pathname.replace(/^\//,'').split('/')
	    };
	}

	//  <div class="titles" onclick="toShowcardInfo()"> 
	function toShowcardInfo(){
		var parse = parseUrl(window.location.href);  
		var path = parse.protocol + '://' + parse.host + ':' + parse.port;
		if("scrm_sps" == parse.segments[0]){
			path +=  '/' + parse.segments[0];
		}
		
		var fileurl = path + "/view/mobile/cardMobile?cid=${cid}&card_id=${cardId}&from=singlemessage&isappinstalled=0";
		location.href=fileurl;
	}
	</script>















